<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTestingXjbUserRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('testing_xjb_user_record', function (Blueprint $table) {
            $table->increments('id');
            $table->Integer('tid')->default(0)->comment('测评tid');
            $table->string('uid')->nullable()->comment('用户唯一标识');
            $table->text('answers')->nullable()->comment('答案的json串');
            $table->double('score')->default(0)->comment('分数');
            $table->string('extra')->nullable()->comment('记录用户答题');
            $table->test('conclusion')->nullable()->comment('测评结论');
            $table->text('final_answers')->nullable()->comment('组装后的答案的json串');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('testing_xjb_factor');
    }
}
